﻿using System;
using UnityEngine;


namespace RStudio.UIFramwork
{
    /// <summary>
    /// 
    /// </summary>
    public class UIModuleDebug : MonoBehaviour
    {
        public bool enableDebug = true;

        public void Start()
        {
            if (!enableDebug) return;


            //UIModuleCenter.Instance.UIModuleEvent.AddAction(OnPageOpen, UIBaseEvent.ActiveUI);

            UIModuleCenter.Instance.UIModuleQueue.OnUIProcessed += OnDebugUIEvent;
        }

        private void OnPageOpen()
        {
            throw new NotImplementedException();
        }

        private void OnDebugUIEvent(UIEventArgs args)
        {
            Debug.Log($"<b>[生命周期]</b> 对象{args.Type} {args.UIEventType}");
        }
    }
}
